package main

import "fmt"

type Teacher struct {
	Name string
}

type Student struct {
	Name string
}

func (s *Student) ModifyName() {
	s.Name = "瓜瓜"
}

func (s *Student) String() string {
	fmt.Println("他的名字叫", s.Name)
	return ""
}

func (s Student) GetName() string {
	return s.Name
}

func main() {
	s := Student{
		"小红",
	}
	fmt.Println(&s)
	s.ModifyName()
	fmt.Println(&s)
}

func main1() {
	var s Student
	s.Name = "小明"

	var str string = s.GetName()
	fmt.Println(str)
}
